# Contributor: Michał Polański <michal@polanski.me>
# Maintainer: Michał Polański <michal@polanski.me>
pkgname=android-file-transfer
pkgver=4.3
pkgrel=0
pkgdesc="Android MTP client with minimalistic UI"
url="https://whoozle.github.io/android-file-transfer-linux/"
license="LGPL-2.1-only"
arch="all"
makedepends="
	cmake
	file-dev
	fuse-dev
	linux-headers
	openssl-dev
	qt5-qtbase-dev
	qt5-qttools-dev
	readline-dev
	samurai
	taglib-dev
	zlib-dev
	"
subpackages="$pkgname-cli $pkgname-libs $pkgname-dev"
source="https://github.com/whoozle/android-file-transfer-linux/archive/v$pkgver/android-file-transfer-$pkgver.tar.gz"
builddir="$srcdir/android-file-transfer-linux-$pkgver"
options="!check" # no test suite

cli() {
	amove usr/bin/aft-mtp-*
}

build() {
	cmake -B build -G Ninja \
		-DCMAKE_BUILD_TYPE=MinSizeRel \
		-DCMAKE_INSTALL_PREFIX=/usr \
		-DBUILD_SHARED_LIB=ON
	cmake --build build
}

package() {
	DESTDIR="$pkgdir" cmake --install build
}

sha512sums="
f5e51ad1532be44916df51dda5f6f7423a5b0d8ebd733a0a3f0424f684b9f84fc5996fb5effd45009eb1c60d873f79e8ecc47a9dc09ff429b4a458807a79ca8c  android-file-transfer-4.3.tar.gz
"
